<script lang="ts" setup>
import {getCurrentInstance, onMounted, provide, ref} from "vue";
import loadComponent from "@/view/activity/components/loading.vue";

const {proxy} = getCurrentInstance() as any; // 类似于this
let txt = ref('正在跳转中...')
provide('loadingTxt', txt)
let loading = ref(false)
provide('loading',loading)
function GetQueryValue(paramKey) {
  const params = new URLSearchParams(window.location.search);
  return params.get(paramKey);
}
onMounted(()=>{
  loading.value= true
  if (proxy.$route.query.token) {
    let token = proxy.$route.query.token
    localStorage.setItem('token', token)
    proxy.$router.push('/activity')
  }
})
</script>

<template>
  <div class="index">
    <loadComponent></loadComponent>
  </div>
</template>

<style lang="scss" scoped>
.index {
  width: 100vw;
  height: 100vh;
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
}
</style>